<?php
// 操作数据库删除内容
include_once './common.php';
$result = array();
if(!empty($_GET)){
		$cid = $_GET['cid'];
		$sql = "DELETE FROM shoppingcart WHERE cid={$cid}";
		$res = mysqli_query($link,$sql);
		if($res){
			$result['status'] = 1;
			$result['info'] = "删除成功";
		}else{
			$result['status'] = 2;
			$result['info'] = "删除失败";
		}
		
}else{
	$result['status'] = 0;
	$result['info'] = "参数不能为空";
}
echo json_encode($result);
?>